Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADLS #6071

Merged
merged 42 commits into from
Nov 1, 2019
Merged

ADLS #6071

merged 42 commits into from
Nov 1, 2019

Conversation

gapra-msft
Copy link
Member

@gapra-msft gapra-msft commented Oct 29, 2019

Resolves #4516

gapra-msft and others added 27 commits October 9, 2019 14:21
leaseaccessconditions on method to string leaseId
accessConditions, permissions, umask, context));
} catch (RuntimeException ex) {
return monoError(logger, ex);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see, the only difference between this and the FileClient create is the pathResourceType. I think we could move all the code for these methods into path client if we add a private final PathResourceType field that gets initialized to the right type in the constructors.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*
* @return Information about the created directory.
*/
public PathInfo create() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as async about moving into PathClient.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @return the updated PathClientBuilder object
* @throws IllegalArgumentException If {@code endpoint} is {@code null} or is a malformed URL.
*/
public PathClientBuilder endpoint(String endpoint) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should support IP style endpoints

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metadata.
*/
sb.append(entry.getKey()).append('=')
.append(new String(Base64.getEncoder().encode(entry.getValue().getBytes(Charset.forName("UTF-8"))),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arset.forName("UTF-8") [](start = 94, length = 22)

This is my bad, but I think there's a StandardCharsets.UTF-8 that would be preferable to a string literal

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

* @param accessControl {@link PathAccessControl}
* @return A reactive response containing the resource info.
*/
public Mono<PathInfo> setAccessControl(PathAccessControl accessControl) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is splitting this api into permissions and acl after preview?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public DataLakeDirectoryAsyncClient getDirectoryAsyncClient(String directoryName) {
if (ImplUtils.isNullOrEmpty(directoryName)) {
throw logger.logExceptionAsError(new IllegalArgumentException("'directoryName' can not be set to null"));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Objects.requireNonNull can make this more concise?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blobs does it this way, but issue created here #6106

/**
* Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly
* by the user; it is only generated by the {@link DataLakeServiceSasSignatureValues} type. Once generated, it can be
* set on a {@link PathClientBuilder} object to be constructed as part of a URL or it can be encoded into a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the builder method actually accepts a string, not SasQueryParameters

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. We will need to take note to change this everywhere else as well

@gapra-msft
Copy link
Member Author

/azp run java - storage - ci

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

DataLakeFileClient fileClient = fileSystemClient.getFileClient("HelloWorld.txt");

String data = "Hello world!";
InputStream dataStream = new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add in creating a directory client and putting a file under it? That way we show all the basic client types.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gapra-msft
Copy link
Member Author

Adding an issue for support for url encoding #6130

@gapra-msft gapra-msft merged commit c675b1d into Azure:master Nov 1, 2019
@gapra-msft gapra-msft deleted the storage/ADLSdev branch November 1, 2019 17:22
@gapra-msft gapra-msft mentioned this pull request Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Data Lake Storage Gen2 Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ADLS Gen2 Phase 1
3 participants